/////////////////////////////////////////////////////////////////////////////
// Name:        wxauipanel.h
// Purpose:     
// Author:      Stephen Whittle
// Modified by: 
// Created:     08/06/2009 21:31:02
// RCS-ID:      
// Copyright:   
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _WXAUIPANEL_H_
#define _WXAUIPANEL_H_



/*!
 * Includes
 */

////@begin includes
#include "wx/aui/framemanager.h"
#include "wx/aui/auibar.h"
////@end includes
#include "wx/confbase.h"
#include "wx/fileconf.h"
#include <wx/socket.h> 
#include "libtelnet.h"
/*!
 * Forward declarations
 */

////@begin forward declarations
class wxAuiPanel;
class wxAuiToolBar;
class wxMudAuiNotebook;
class wxMudTextCtrl;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_PANEL 10002
#define ID_TOOLBAR 10003
#define ID_TOOL 10004
#define ID_TOOL1 10005
#define ID_TOOL2 10006
#define ID_TOOL3 10007
#define ID_TOOL4 10008
#define ID_TOOL5 10027
#define ID_TOOL6 10026
#define ID_TOOL7 10022
#define ID_TOOL8 10079
#define ID_TOOL16 10101
#define SYMBOL_WXAUIPANEL_STYLE wxSIMPLE_BORDER|wxTAB_TRAVERSAL
#define SYMBOL_WXAUIPANEL_IDNAME ID_PANEL
#define SYMBOL_WXAUIPANEL_SIZE wxDefaultSize
#define SYMBOL_WXAUIPANEL_POSITION wxDefaultPosition
////@end control identifiers 
#define SOCKET_ID (wxID_HIGHEST+1)
#define ID_AUINOTEBOOK 10009
#define ID_AUINOTEBOOK1 10012

/*! 
 * wxAuiPanel class declaration
 */

class wxAuiPanel: public wxPanel
{    
    DECLARE_DYNAMIC_CLASS( wxAuiPanel )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxAuiPanel();
    wxAuiPanel(wxWindow* parent, wxWindowID id = ID_PANEL, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSUNKEN_BORDER|wxTAB_TRAVERSAL);

    /// Creation
    bool Create(wxWindow* parent, wxWindowID id = ID_PANEL, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSUNKEN_BORDER|wxTAB_TRAVERSAL);

    /// Destructor
    ~wxAuiPanel();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin wxAuiPanel event handler declarations

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL
    void OnToolClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL1
    void OnDisconnectClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL2
    void OnPrefsClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL3
    void OnAddTopClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL4
    void OnAddBottomClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL5
    void OnNewFloatWindowClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL6
    void OnFilterEditClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TOOL16
    void OnFTPClick( wxCommandEvent& event );

////@end wxAuiPanel event handler declarations

////@begin wxAuiPanel member function declarations

    /// Returns the AUI manager object
    wxAuiManager& GetAuiManager() { return m_auiManager; }

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end wxAuiPanel member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin wxAuiPanel member variables
    wxAuiManager m_auiManager;
    wxAuiToolBar* m_MainToolbar;
    wxMudAuiNotebook* m_Main;
    wxMudAuiNotebook* m_Sub;
////@end wxAuiPanel member variables
void OnSocketEvent( wxSocketEvent& event );
void OnTextUpdateEvent( wxCommandEvent& event );
};
static void telnet_event_handler(telnet_t *telnet, telnet_event_t *ev,
		void *user_data);

#endif
    // _WXAUIPANEL_H_
